<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>fdk-aac: original/libSBRdec/src/env_extr.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">fdk-aac
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_ed137715e08969a186ec660e8ae6e2fb.html">original</a></li><li class="navelem"><a class="el" href="dir_222de58a05c98cc4a78309a37525cd28.html">libSBRdec</a></li><li class="navelem"><a class="el" href="dir_c997d48ad60fbe63e2ba342b9c79db98.html">src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">env_extr.cpp File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Envelope extraction The functions provided by this module are mostly called by applySBR(). After it is determined that there is valid SBR data, <a class="el" href="env__extr_8cpp.html#a1535167f85903da45054117ce2ee7fc3" title="Read header data from bitstream.">sbrGetHeaderData()</a> might be called if the current SBR data contains an <a class="el" href="env__extr_8cpp.html#SBR_HEADER_ELEMENT">SBR_HEADER_ELEMENT</a> as opposed to a <a class="el" href="env__extr_8cpp.html#SBR_STANDARD_ELEMENT">SBR_STANDARD_ELEMENT</a>. This function may return various error codes as defined in #SBR_HEADER_STATUS . Most importantly it returns HEADER_RESET when decoder settings need to be recalculated according to the SBR specifications. In that case applySBR() will initiatite the required re-configuration.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="env__extr_8h_source.html">env_extr.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="sbr__ram_8h_source.html">sbr_ram.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="sbr__rom_8h_source.html">sbr_rom.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="huff__dec_8h_source.html">huff_dec.h</a>&quot;</code><br />
<code>#include &quot;psbitdec.h&quot;</code><br />
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_s_r___m_a_p_p_i_n_g.html">SR_MAPPING</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:aed8a70e46680829ea2dcf99ad40f5ba5"><td class="memItemLeft" align="right" valign="top"><a id="aed8a70e46680829ea2dcf99ad40f5ba5"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>DRM_PARAMETRIC_STEREO</b>&#160;&#160;&#160;0</td></tr>
<tr class="separator:aed8a70e46680829ea2dcf99ad40f5ba5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a83a1213eb17a8b1ace1b5571b90c4031"><td class="memItemLeft" align="right" valign="top"><a id="a83a1213eb17a8b1ace1b5571b90c4031"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>EXTENSION_ID_PS_CODING</b>&#160;&#160;&#160;2</td></tr>
<tr class="separator:a83a1213eb17a8b1ace1b5571b90c4031"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a7ce2500ade45eacfa18e7135c992ff47"><td class="memItemLeft" align="right" valign="top"><a id="a7ce2500ade45eacfa18e7135c992ff47"></a>
typedef struct <a class="el" href="struct_s_r___m_a_p_p_i_n_g.html">SR_MAPPING</a>&#160;</td><td class="memItemRight" valign="bottom"><b>SR_MAPPING</b></td></tr>
<tr class="separator:a7ce2500ade45eacfa18e7135c992ff47"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a834a02ed658664a4ef15965e413a9692"><td class="memItemLeft" align="right" valign="top"><a class="el" href="machine__type_8h.html#afff0ab3629a68bc1bb3b2a2f4296173f">UINT</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="env__extr_8cpp.html#a834a02ed658664a4ef15965e413a9692">sbrdec_mapToStdSampleRate</a> (<a class="el" href="machine__type_8h.html#afff0ab3629a68bc1bb3b2a2f4296173f">UINT</a> fs, <a class="el" href="machine__type_8h.html#afff0ab3629a68bc1bb3b2a2f4296173f">UINT</a> isUsac)</td></tr>
<tr class="memdesc:a834a02ed658664a4ef15965e413a9692"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maps sampling frequencies to frequencies for which setup tables are available.  <a href="env__extr_8cpp.html#a834a02ed658664a4ef15965e413a9692">More...</a><br /></td></tr>
<tr class="separator:a834a02ed658664a4ef15965e413a9692"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad399fccff96bf713878d8f872bd3c53a"><td class="memItemLeft" align="right" valign="top">SBR_ERROR&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="env__extr_8cpp.html#ad399fccff96bf713878d8f872bd3c53a">initHeaderData</a> (<a class="el" href="struct_s_b_r___h_e_a_d_e_r___d_a_t_a.html">HANDLE_SBR_HEADER_DATA</a> hHeaderData, const int sampleRateIn, const int sampleRateOut, const <a class="el" href="machine__type_8h.html#a4cf9af43a95c45c3d469658098dfbe1a">INT</a> downscaleFactor, const int samplesPerFrame, const <a class="el" href="machine__type_8h.html#afff0ab3629a68bc1bb3b2a2f4296173f">UINT</a> flags, const int setDefaultHdr)</td></tr>
<tr class="memdesc:ad399fccff96bf713878d8f872bd3c53a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize SBR header data.  <a href="env__extr_8cpp.html#ad399fccff96bf713878d8f872bd3c53a">More...</a><br /></td></tr>
<tr class="separator:ad399fccff96bf713878d8f872bd3c53a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a08ce0b9b82b24d120c26393e8244a053"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="env__extr_8cpp.html#a08ce0b9b82b24d120c26393e8244a053">initSbrPrevFrameData</a> (<a class="el" href="struct_s_b_r___p_r_e_v___f_r_a_m_e___d_a_t_a.html">HANDLE_SBR_PREV_FRAME_DATA</a> h_prev_data, int timeSlots)</td></tr>
<tr class="memdesc:a08ce0b9b82b24d120c26393e8244a053"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the <a class="el" href="struct_s_b_r___p_r_e_v___f_r_a_m_e___d_a_t_a.html">SBR_PREV_FRAME_DATA</a> struct.  <a href="env__extr_8cpp.html#a08ce0b9b82b24d120c26393e8244a053">More...</a><br /></td></tr>
<tr class="separator:a08ce0b9b82b24d120c26393e8244a053"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1535167f85903da45054117ce2ee7fc3"><td class="memItemLeft" align="right" valign="top">SBR_HEADER_STATUS&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="env__extr_8cpp.html#a1535167f85903da45054117ce2ee7fc3">sbrGetHeaderData</a> (<a class="el" href="struct_s_b_r___h_e_a_d_e_r___d_a_t_a.html">HANDLE_SBR_HEADER_DATA</a> hHeaderData, <a class="el" href="struct_f_d_k___b_i_t_s_t_r_e_a_m.html">HANDLE_FDK_BITSTREAM</a> hBs, const <a class="el" href="machine__type_8h.html#afff0ab3629a68bc1bb3b2a2f4296173f">UINT</a> flags, const int fIsSbrData, const <a class="el" href="machine__type_8h.html#aed5a2dbe32af3a91203f0f5e8697e873">UCHAR</a> configMode)</td></tr>
<tr class="memdesc:a1535167f85903da45054117ce2ee7fc3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read header data from bitstream.  <a href="env__extr_8cpp.html#a1535167f85903da45054117ce2ee7fc3">More...</a><br /></td></tr>
<tr class="separator:a1535167f85903da45054117ce2ee7fc3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a38125adb81481e880a0da9a6cb80e37c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="env__extr_8cpp.html#a38125adb81481e880a0da9a6cb80e37c">sbrGetSyntheticCodedData</a> (<a class="el" href="struct_s_b_r___h_e_a_d_e_r___d_a_t_a.html">HANDLE_SBR_HEADER_DATA</a> hHeaderData, <a class="el" href="struct_s_b_r___f_r_a_m_e___d_a_t_a.html">HANDLE_SBR_FRAME_DATA</a> hFrameData, <a class="el" href="struct_f_d_k___b_i_t_s_t_r_e_a_m.html">HANDLE_FDK_BITSTREAM</a> hBs, const <a class="el" href="machine__type_8h.html#afff0ab3629a68bc1bb3b2a2f4296173f">UINT</a> flags)</td></tr>
<tr class="memdesc:a38125adb81481e880a0da9a6cb80e37c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get missing harmonics parameters (only used for AAC+SBR)  <a href="env__extr_8cpp.html#a38125adb81481e880a0da9a6cb80e37c">More...</a><br /></td></tr>
<tr class="separator:a38125adb81481e880a0da9a6cb80e37c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a445e0930adde1ddbb1073c7532ec1122"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="env__extr_8cpp.html#a445e0930adde1ddbb1073c7532ec1122">sbrGetChannelElement</a> (<a class="el" href="struct_s_b_r___h_e_a_d_e_r___d_a_t_a.html">HANDLE_SBR_HEADER_DATA</a> hHeaderData, <a class="el" href="struct_s_b_r___f_r_a_m_e___d_a_t_a.html">HANDLE_SBR_FRAME_DATA</a> hFrameDataLeft, <a class="el" href="struct_s_b_r___f_r_a_m_e___d_a_t_a.html">HANDLE_SBR_FRAME_DATA</a> hFrameDataRight, <a class="el" href="struct_s_b_r___p_r_e_v___f_r_a_m_e___d_a_t_a.html">HANDLE_SBR_PREV_FRAME_DATA</a> hFrameDataLeftPrev, <a class="el" href="machine__type_8h.html#aed5a2dbe32af3a91203f0f5e8697e873">UCHAR</a> pvc_mode_last, <a class="el" href="struct_f_d_k___b_i_t_s_t_r_e_a_m.html">HANDLE_FDK_BITSTREAM</a> hBs, <a class="el" href="struct_p_s___d_e_c.html">HANDLE_PS_DEC</a> hParametricStereoDec, const <a class="el" href="machine__type_8h.html#afff0ab3629a68bc1bb3b2a2f4296173f">UINT</a> flags, const int overlap)</td></tr>
<tr class="memdesc:a445e0930adde1ddbb1073c7532ec1122"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read bitstream elements of a SBR channel element.  <a href="env__extr_8cpp.html#a445e0930adde1ddbb1073c7532ec1122">More...</a><br /></td></tr>
<tr class="separator:a445e0930adde1ddbb1073c7532ec1122"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Envelope extraction The functions provided by this module are mostly called by applySBR(). After it is determined that there is valid SBR data, <a class="el" href="env__extr_8cpp.html#a1535167f85903da45054117ce2ee7fc3" title="Read header data from bitstream.">sbrGetHeaderData()</a> might be called if the current SBR data contains an <a class="el" href="env__extr_8cpp.html#SBR_HEADER_ELEMENT">SBR_HEADER_ELEMENT</a> as opposed to a <a class="el" href="env__extr_8cpp.html#SBR_STANDARD_ELEMENT">SBR_STANDARD_ELEMENT</a>. This function may return various error codes as defined in #SBR_HEADER_STATUS . Most importantly it returns HEADER_RESET when decoder settings need to be recalculated according to the SBR specifications. In that case applySBR() will initiatite the required re-configuration. </p>
<p>The header data is stored in a <a class="el" href="struct_s_b_r___h_e_a_d_e_r___d_a_t_a.html">SBR_HEADER_DATA</a> structure.</p>
<p>The actual SBR data for the current frame is decoded into <a class="el" href="struct_s_b_r___f_r_a_m_e___d_a_t_a.html">SBR_FRAME_DATA</a> stuctures by sbrGetChannelPairElement() [for stereo streams] and sbrGetSingleChannelElement() [for mono streams]. There is no fractional arithmetic involved.</p>
<p>Once the information is extracted, the data needs to be further prepared before the actual decoding process. This is done in <a class="el" href="env__dec_8cpp.html#ac15872b38c44f362cb162b328000d5ef" title="Convert raw envelope and noisefloor data to energy levels.">decodeSbrData()</a>.</p>
<dl class="section see"><dt>See also</dt><dd>Description of buffer management in applySBR(). <a class="el" href="documentation_overview.html">Overview of important information resources and</a></dd></dl>
<h1>About the SBR data format:</h1>
<p>Each frame includes SBR data (side chain information), and can be either the <a class="el" href="env__extr_8cpp.html#SBR_HEADER_ELEMENT">SBR_HEADER_ELEMENT</a> or the <a class="el" href="env__extr_8cpp.html#SBR_STANDARD_ELEMENT">SBR_STANDARD_ELEMENT</a>. Parts of the data can be protected by a CRC checksum.</p>
<p><a class="anchor" id="SBR_HEADER_ELEMENT"></a></p><h2>The SBR_HEADER_ELEMENT</h2>
<p>The SBR_HEADER_ELEMENT can be transmitted with every frame, however, it typically is send every second or so. It contains fundamental information such as SBR sampling frequency and frequency range as well as control signals that do not require frequent changes. It also includes the <a class="el" href="env__extr_8cpp.html#SBR_STANDARD_ELEMENT">SBR_STANDARD_ELEMENT</a>.</p>
<p>Depending on the changes between the information in a current SBR_HEADER_ELEMENT and the previous SBR_HEADER_ELEMENT, the SBR decoder might need to be reset and reconfigured (e.g. new tables need to be calculated).</p>
<p><a class="anchor" id="SBR_STANDARD_ELEMENT"></a></p><h2>The SBR_STANDARD_ELEMENT</h2>
<p>This data can be subdivided into "side info" and "raw data", where side info is defined as signals needed to decode the raw data and some decoder tuning signals. Raw data is referred to as PCM and Huffman coded envelope and noise floor estimates. The side info also includes information about the time-frequency grid for the current frame.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="documentation_overview.html">Overview of important information resources and</a> </dd></dl>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="ad399fccff96bf713878d8f872bd3c53a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad399fccff96bf713878d8f872bd3c53a">&#9670;&nbsp;</a></span>initHeaderData()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SBR_ERROR initHeaderData </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_s_b_r___h_e_a_d_e_r___d_a_t_a.html">HANDLE_SBR_HEADER_DATA</a>&#160;</td>
          <td class="paramname"><em>hHeaderData</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>sampleRateIn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>sampleRateOut</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="machine__type_8h.html#a4cf9af43a95c45c3d469658098dfbe1a">INT</a>&#160;</td>
          <td class="paramname"><em>downscaleFactor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>samplesPerFrame</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="machine__type_8h.html#afff0ab3629a68bc1bb3b2a2f4296173f">UINT</a>&#160;</td>
          <td class="paramname"><em>flags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>setDefaultHdr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize SBR header data. </p>
<p>Copy default values to the header data struct and patch some entries depending on the core codec. </p>

</div>
</div>
<a id="a08ce0b9b82b24d120c26393e8244a053"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a08ce0b9b82b24d120c26393e8244a053">&#9670;&nbsp;</a></span>initSbrPrevFrameData()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void initSbrPrevFrameData </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_s_b_r___p_r_e_v___f_r_a_m_e___d_a_t_a.html">HANDLE_SBR_PREV_FRAME_DATA</a>&#160;</td>
          <td class="paramname"><em>h_prev_data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>timeSlots</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize the <a class="el" href="struct_s_b_r___p_r_e_v___f_r_a_m_e___d_a_t_a.html">SBR_PREV_FRAME_DATA</a> struct. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">h_prev_data</td><td>handle to struct <a class="el" href="struct_s_b_r___p_r_e_v___f_r_a_m_e___d_a_t_a.html">SBR_PREV_FRAME_DATA</a> </td></tr>
    <tr><td class="paramname">timeSlots</td><td>Framelength in SBR-timeslots </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a834a02ed658664a4ef15965e413a9692"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a834a02ed658664a4ef15965e413a9692">&#9670;&nbsp;</a></span>sbrdec_mapToStdSampleRate()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="machine__type_8h.html#afff0ab3629a68bc1bb3b2a2f4296173f">UINT</a> sbrdec_mapToStdSampleRate </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="machine__type_8h.html#afff0ab3629a68bc1bb3b2a2f4296173f">UINT</a>&#160;</td>
          <td class="paramname"><em>fs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="machine__type_8h.html#afff0ab3629a68bc1bb3b2a2f4296173f">UINT</a>&#160;</td>
          <td class="paramname"><em>isUsac</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Maps sampling frequencies to frequencies for which setup tables are available. </p>
<p>Maps arbitary sampling frequency to nearest neighbors for which setup tables are available (e.g. 25600 -&gt; 24000). Used for startFreq calculation. The mapping is defined in 14496-3 (4.6.18.2.6), fs(SBR), and table 4.82</p>
<dl class="section return"><dt>Returns</dt><dd>mapped sampling frequency Output sampling frequency </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">isUsac</td><td>Output sampling frequency </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a445e0930adde1ddbb1073c7532ec1122"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a445e0930adde1ddbb1073c7532ec1122">&#9670;&nbsp;</a></span>sbrGetChannelElement()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int sbrGetChannelElement </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_s_b_r___h_e_a_d_e_r___d_a_t_a.html">HANDLE_SBR_HEADER_DATA</a>&#160;</td>
          <td class="paramname"><em>hHeaderData</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_s_b_r___f_r_a_m_e___d_a_t_a.html">HANDLE_SBR_FRAME_DATA</a>&#160;</td>
          <td class="paramname"><em>hFrameDataLeft</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_s_b_r___f_r_a_m_e___d_a_t_a.html">HANDLE_SBR_FRAME_DATA</a>&#160;</td>
          <td class="paramname"><em>hFrameDataRight</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_s_b_r___p_r_e_v___f_r_a_m_e___d_a_t_a.html">HANDLE_SBR_PREV_FRAME_DATA</a>&#160;</td>
          <td class="paramname"><em>hFrameDataLeftPrev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="machine__type_8h.html#aed5a2dbe32af3a91203f0f5e8697e873">UCHAR</a>&#160;</td>
          <td class="paramname"><em>pvc_mode_last</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_f_d_k___b_i_t_s_t_r_e_a_m.html">HANDLE_FDK_BITSTREAM</a>&#160;</td>
          <td class="paramname"><em>hBs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_p_s___d_e_c.html">HANDLE_PS_DEC</a>&#160;</td>
          <td class="paramname"><em>hParametricStereoDec</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="machine__type_8h.html#afff0ab3629a68bc1bb3b2a2f4296173f">UINT</a>&#160;</td>
          <td class="paramname"><em>flags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>overlap</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Read bitstream elements of a SBR channel element. </p>
<dl class="section return"><dt>Returns</dt><dd>SbrFrameOK </dd></dl>

</div>
</div>
<a id="a1535167f85903da45054117ce2ee7fc3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1535167f85903da45054117ce2ee7fc3">&#9670;&nbsp;</a></span>sbrGetHeaderData()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SBR_HEADER_STATUS sbrGetHeaderData </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_s_b_r___h_e_a_d_e_r___d_a_t_a.html">HANDLE_SBR_HEADER_DATA</a>&#160;</td>
          <td class="paramname"><em>hHeaderData</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_f_d_k___b_i_t_s_t_r_e_a_m.html">HANDLE_FDK_BITSTREAM</a>&#160;</td>
          <td class="paramname"><em>hBs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="machine__type_8h.html#afff0ab3629a68bc1bb3b2a2f4296173f">UINT</a>&#160;</td>
          <td class="paramname"><em>flags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>fIsSbrData</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="machine__type_8h.html#aed5a2dbe32af3a91203f0f5e8697e873">UCHAR</a>&#160;</td>
          <td class="paramname"><em>configMode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Read header data from bitstream. </p>
<dl class="section return"><dt>Returns</dt><dd>error status - 0 if ok </dd></dl>

</div>
</div>
<a id="a38125adb81481e880a0da9a6cb80e37c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a38125adb81481e880a0da9a6cb80e37c">&#9670;&nbsp;</a></span>sbrGetSyntheticCodedData()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int sbrGetSyntheticCodedData </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_s_b_r___h_e_a_d_e_r___d_a_t_a.html">HANDLE_SBR_HEADER_DATA</a>&#160;</td>
          <td class="paramname"><em>hHeaderData</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_s_b_r___f_r_a_m_e___d_a_t_a.html">HANDLE_SBR_FRAME_DATA</a>&#160;</td>
          <td class="paramname"><em>hFrameData</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_f_d_k___b_i_t_s_t_r_e_a_m.html">HANDLE_FDK_BITSTREAM</a>&#160;</td>
          <td class="paramname"><em>hBs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="machine__type_8h.html#afff0ab3629a68bc1bb3b2a2f4296173f">UINT</a>&#160;</td>
          <td class="paramname"><em>flags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get missing harmonics parameters (only used for AAC+SBR) </p>
<dl class="section return"><dt>Returns</dt><dd>error status - 0 if ok </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>
